﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BusinessPlatformTool.BusinessObjectStructure
{
    internal class Tables : List<ITable>, ITables
    {
        public ITable New()
        {
            ITable table = new Table();
            this.Add(table);
            return table;
        }

        public IList<ITable> GetChildTable()
        {
            return this.FindAll(item => item.IsPrimary == false);
        }


        public ITable GetPrimaryTable()
        {
            return this.Find(table => table.IsPrimary == true);
        }
    }
}
